#编译器
CC=g++
#CC=gcc

#编译选项
CFLAGS=-c -Wall

#链接选项
LDFLAGS=

#将所有源文件添加到 SOURCES
SOURCES=main.cpp
OBJECTS=$(SOURCES:.cpp=.o)

#可执行文件名
EXECUTABLE=main

all: $(SOURCES) $(EXECUTABLE)

$(EXECUTABLE): $(OBJECTS)
	$(CC) $(LDFLAGS) $(OBJECTS) -o $@

.cpp.o:
	$(CC) $(CFLAGS) $< -o $@

clean:
	@echo "Removing..."
	rm -f $(OBJECTS) $(EXECUTABLE)
